package com.lixixi.tingshu.common.constant;

public class RedisConstant {

	public static final String ALBUM_INFO_PREFIX = "album:info:";
	public static final String ALBUM_LOCK_SUFFIX = "album:lock:";

	public static final String ORDER_TRADE_NO = "order:tradeno:";
	public static final String DELAY_PAY_LOCK = "order-delay-lock";

	//位图使用,判断用户一天播放的 声音 种类
	public static final String BIT_MAP_TRACK = "bit_map_track";
	public static final long BIT_MAP_TIMEOUT = 24 * 60 * 60;

	//单位：秒
	//单位：秒 尝试获取锁的最大等待时间
	public static final long ALBUM_LOCK_EXPIRE_PX1 = 1;
	//单位：秒 锁的持有时间
	public static final long ALBUM_LOCK_EXPIRE_PX2 = 1;

	public static final long ALBUM_TIMEOUT = 60 * 60;
	// 商品如果在数据库中不存在那么会缓存一个空对象进去，但是这个对象是没有用的，所以这个对象的过期时间应该不能太长，
	// 如果太长会占用内存。
	// 定义变量，记录空对象的缓存过期时间
	public static final long ALBUM_TEMPORARY_TIMEOUT = 10 * 60;
	//  布隆过滤器使用！
	public static final String ALBUM_BLOOM_FILTER="album:bloom:filter";

	public static final String ALBUM_BLOOM_FILTER_NEW="album:bloom:filter:new";

	public static final String CACHE_INFO_PREFIX = "cache:info:";
	public static final String CACHE_LOCK_SUFFIX = "cache:lock:";

	//单位：秒
	//单位：秒 尝试获取锁的最大等待时间
	public static final long CACHE_LOCK_EXPIRE_PX1 = 1;
	//单位：秒 锁的持有时间
	public static final long CACHE_LOCK_EXPIRE_PX2 = 1;

	public static final long CACHE_TIMEOUT = 24 * 60 * 60;
	// 商品如果在数据库中不存在那么会缓存一个空对象进去，但是这个对象是没有用的，所以这个对象的过期时间应该不能太长，
	// 如果太长会占用内存。
	// 定义变量，记录空对象的缓存过期时间
	public static final long CACHE_TEMPORARY_TIMEOUT = 10 * 60;

	//订单超时延迟队列
	public static final String ORDER_DELAY_QUEUE = "order:delay:queue";

	//用户登录
	public static final String USER_LOGIN_KEY_PREFIX = "user:login:";
	public static final String USER_LOGIN_REFRESH_KEY_PREFIX = "user:login:refresh:";
	public static final int USER_LOGIN_KEY_TIMEOUT = 60 * 60 * 24 * 100;
	public static final int USER_LOGIN_REFRESH_KEY_TIMEOUT = 60 * 60 * 24 * 365;

	public static final String RANKING_KEY_PREFIX = "ranking:";
	public static final String ALBUM_STAT_ENDTIME = "album:stat:endTime";
	public static final String LOWER_ALBUM_COUNT = "lower:album:count";
	public static final String LOWER_ALBUM_COUNT_LOCK = "lower:album:count:lock";
	public static final String ALBUM_INFO_VO_PREFIX = "album:info:vo:";
	public static final String ACCOUNT_LOCK_PREFIX = "account:lock:";
	public static final String CHECK_LOCK_PREFIX = "check:lock:";
}
